import { ajaxService } from '@/utils/request';

const env = import.meta.env;
// let baseURL = env.VITE_API_BASE_URL;
let baseURL = env.VITE_INVENTORY_URL;

// 获取仓库列表
export function GetShelvesAll(params?: any) {
  return ajaxService({
    url: '/warehouse/shelves/getall',
    method: 'get',
    baseURL,
    params,
  });
}

// 获取单个仓库
export function GetSingleShelves(params?: any) {
  return ajaxService({
    url: '/warehouse/shelves/getone',
    method: 'get',
    baseURL,
    params,
  });
}

// 新增仓库/库区
export function postShelves(data: any) {
  return ajaxService({
    url: '/warehouse/shelves/add',
    method: 'post',
    baseURL,
    data,
  });
}

// 编辑仓库/库区
export function putShelves(data: any) {
  return ajaxService({
    url: '/warehouse/shelves/put',
    method: 'put',
    baseURL,
    data,
  });
}

// 删除物料/产品分类
export function delShelves(params: any) {
  return ajaxService({
    url: '/warehouse/shelves/detlete',
    method: 'delete',
    baseURL,
    params,
  });
}
